import App from './App'
import { createSSRApp } from 'vue'

import * as Pinia from 'pinia';

import myRequest from './request.js'
import setStorage from './utils/storage.js'
import metheds from './utils/common.js'//公共方法
import {host} from './utils/host.js'

let methods = {...setStorage,...metheds,...host}

export function createApp() {
	const app = createSSRApp(App)
	app.config.globalProperties.$reQuest = myRequest
	app.config.globalProperties.$c = methods;
	app.use(Pinia.createPinia());
	return {
		app,
		Pinia
	}
}